{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\vnstudio\\lib\\site-packages\\ipykernel_launcher.py:9: UserWarning: Matplotlib is currently using module://matplotlib_inline.backend_inline, which is a non-GUI backend, so cannot show the figure.\n",
      "  if __name__ == '__main__':\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAkJklEQVR4nO3deXxU9bnH8c+PkLCGNWELhAmyCcga1uBeFQVF64YKStBSUVxqb73avb22915vq9Vqq1wroGxiBRdcKm5Vwp4QdkEgk4Q1gQDZyP67f8zgRUrIBDJzZvm+X6+8mMwcZr4eTx5+ec6ZZ4y1FhERCV6NnA4gIiJnp0ItIhLkVKhFRIKcCrWISJBToRYRCXKN/fGkcXFx1uVy+eOpRUTCUnp6+mFrbfyZHvNLoXa5XKxfv94fTy0iEpaMMdm1PabWh4hIkFOhFhEJcirUIiJBToVaRCTIqVCLiAS5Ogu1MaaPMSbzlK9CY8yjAcgmIiL4cHmetXYHMBjAGBMF7AOW+jeWiIicVN/Wx5XAbmttrdf7iQSrFd8cZtmm/VRU1TgdRaRe6vuGl0nAwjM9YIyZDkwHSExMPM9YIg1r095jTJuzjorqGjrENmHKqO7cOTKR9i2bOB1NpE7G1w8OMMbEAPuB/tbaQ2fbNjk52eqdiRIsjpZUMOHPK7DW8vMJ/Vi0Lpcvd+YT07gREwd1ITUliX5dWjkdUyKcMSbdWpt8psfqs6K+Fsioq0iLBJOaGsuPFmeSV1TGm/ePYXC3Nlx3UWd25RUxZ6Wbt9L38Wb6XkYmtSM1xcVV/ToR1cg4HVvkO+rTo76DWtoeIsHqxc938cWOf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6AMuNMV97V5yBkIFnNkCxMeY64G2gV4Be2xfXA2nW2lNX337fX8aYlnh+cB+11hY25HOfD19yOXGM1ZHLsWPMx/+PAT3GrLXVwGBjTBtgqTFmgLX2jOdqGlowraj3Ad1O+b6r977a7g8YY8xA4BVgorX2yMn7rbX7vH/mAUup568z58NaW3jyVzFr7QdAtDEmjiDYX16TOO1XUn/vL2NMNJ4f7vnW2iVn2MSRY8yHXI4cY3XlcuoY82V/eQX8GPM+9zHgc/61PfbtfjHGNAZaA0doiP3V0E33s30BLmo/OTae757oWeu9vx2QheckT1vv7XYBzJWIp6c05rT7WwCxp9xeCYwLYK5O/P8blkYAOd591xjPybAk/v9ET/9A5fI+3hpPH7tFoPaX97/9NeBPZ9km4MeYj7kCfoz5mCvgx5gvuZw4xoB4oI33djPgK2DCads8yHdPJi723u7Pd08m7qGeJxMD1vowng/JvQyIM8bsBX6FpyGPtfYl4AM8Z+V3AaVAqvexAmPMfwDrvE/1W/vdX3X8neuXePpMf/GcF6DKeqZjdcTz6w94DtwF1tqPApjrFmCGMaYKOAFMsp6josoYMxP4B56z869aa7cGMBfATcDH1tqSU/6qX/cXkAJMATZ7+4gAP8VTBJ08xnzJ5cQx5ksuJ44xX3JB4I+xzsBcY0wUnk7EYmvtMmPMb4H11tp3gb8BrxtjduH5R2SSN/NWY8xiYBtQBTxoPW0Un+kt5CIiQS6YetQiInIGKtQiIkFOhVpEJMipUIuIBDkVahGRIKdCLSIS5FSoRUSC3P8Buw8Ec37Snd4AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "\n",
    "x = [1,2,3]\n",
    "y = [1,7,5]\n",
    "\n",
    "plt.ion()               # interactive mode on\n",
    "fig,ax = plt.subplots()\n",
    "line, = ax.plot(x,y)\n",
    "fig.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# second cell ------------------------------\n",
    "\n",
    "x.append(4)\n",
    "y.append(10)\n",
    "\n",
    "line.set_data(x,y)   # set new data\n",
    "\n",
    "ax.relim()           # recompute the data limits\n",
    "ax.autoscale_view()  # automatic axis scaling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# %% \n",
    "# third cell: just a radom example to plot sequentially ---------------------\n",
    "\n",
    "from random import randint\n",
    "\n",
    "for i in range(5):\n",
    "    x.append(x[-1]+1)\n",
    "    y.append(randint(0,10))\n",
    "\n",
    "    line.set_data(x,y)   # set new data\n",
    "\n",
    "    ax.relim()           # recompute the data limits\n",
    "    ax.autoscale_view()  # automatic axis scaling\n",
    "\n",
    "    plt.pause(0.5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "0d2af4708e901420ca316528daed9d207adf237f59982b81f6b4928a0eab77f9"
  },
  "kernelspec": {
   "display_name": "Python 3.7.1 64-bit (system)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.1"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
